<?php
require_once '../models/Product.php';

$action = $_REQUEST['action'];
if ($action == "updateImage"){
	$icon = $_REQUEST['image'];
	$check = Product::checkBrand($brandName);
	if ($check == true){
		$re = Product::insertBrand($brandName);
		if ($re){
			print('<span class="ok">Brand is successfully inserted.<a href="ql_model.php">Click Add new model</a></span>');
		}
		else print('<span class="error">System is busy. Please try again later.</span>');	
	}
	else print ('<span class="warning">This Brand is already in use.</span>');
	echo  Product::printBrandTable('');
}
?>